﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using AIPASoft.Interfaces.Base;
using System.Windows;
using AIPASoft.Interfaces.BusinessDomain;
using ConsoleDomain.View;

namespace ConsoleDomain.ViewModel
{
    public class ConsoleRibbonViewModel
    {

        private IApplicationManager _applicationManager;

        public ConsoleRibbonViewModel(IApplicationManager applicationManager)
        {
            _applicationManager = applicationManager;
        }

        private ICommand _bankAccountCommand;
        public ICommand BankAccountCommand
        {
            get
            {
                return _bankAccountCommand ?? (_bankAccountCommand = new RelayCommand(param => this.ShowBankAccountWindow(),
                                                                          null));
            }
        }

        private View.BankDetailView _view;
        private void ShowBankAccountWindow()
        {
            if(_view==null)
                _view = new BankDetailView();

            _view.DataContext = new ViewModel.BankDetailsViewModel();

            _applicationManager.ContentHolder.Content = _view;
        }
    }
}
